//Eg4-8.cpp
#include <iostream>
using namespace std;
class B {
public: 
    B(){ cout<<"Constructing B"<<endl; }
    ~B(){ cout<<"Destructing B"<<endl; }
};
class D:public B {
public: 
    D(){ cout<<"Constructing D"<<endl; }
    ~D(){ cout<<"Destructing D"<<endl; }
};
void main(){
    D d;
}
